/**
 * 
 */
package org.istt.service.impl;

import java.util.List;

import org.istt.dao.WorkflowProcessDao;
import org.istt.domain.WorkflowProcess;
import org.istt.service.WorkflowProcessManager;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author NDTHO
 *
 */
@Service("workflowProcessManager")
public class WorkflowProcessManagerImpl extends ManagerImpl<WorkflowProcess, Long> implements WorkflowProcessManager {
	
	/**
	 * @param WorkflowProcessDao the WorkflowProcessDao to set
	 */
	@Autowired
	public void setWorkflowProcessDao(WorkflowProcessDao dao) {
		this.dao = dao;
	}

	/*@Override
	public void removeProcessByWorkflow(Workflow workflow) {
		this.dao.removeByWorkflow(workflow);
	}*/
	
	/*
	 * (non-Javadoc)
	 * @see org.istt.service.WorkflowProcessManager#getStartOfWfp(java.lang.Long)
	 */
	@Override
	public WorkflowProcess getFirstStepOfWorkflow(Long wfpId) {
		return ((WorkflowProcessDao)dao).getFirstStepOfWorkflow(wfpId);
	}
	
	/*
	 * (non-Javadoc)
	 * @see org.istt.service.WorkflowProcessManager#getNextStepOfWorkflow(java.lang.String, java.lang.Integer, java.lang.Long)
	 */
	@Override
	public WorkflowProcess getNextStepOfWorkflow(String fileId, Integer nextPos, Long processStatusId) {
		return ((WorkflowProcessDao)dao).getNextStepOfWorkflow(fileId, nextPos, processStatusId);
	}
	
	/*
	 * (non-Javadoc)
	 * @see org.istt.service.WorkflowProcessManager#getWorkflowProcesses()
	 */
	@Override
	public List<WorkflowProcess> getWorkflowProcesses(Long workflowId) {
		return ((WorkflowProcessDao)dao).getWorkflowProcesses(workflowId);
	}

	/*@Override
	public WorkflowProcess getById(Long id) {
		
		return dao.getById(id);
	}*/

	/*@Override
	public void updateWfPermission(WorkflowProcess wf) {
		
		dao.updateWfPermission(wf);
	}*/
}
